A new breed of 32-bit desktop operating systems is evolving. These operating systems have brought to the desktop the concepts of multitasking and multithreading. These operating systems are capable of making a single computer processing unit (CPU) appear as many CPUs in a personal computer (PC). Most 32-bit desktop operating systems accomplish this through time-sliced multitasking or event-driven multitasking.
In its simplest form, time-slicing works by alternately giving small amounts of time, called time-slices, to applications. For example, a user running three programs: a word processor, a database, and a spreadsheet, may run the word processor in the foreground, the database in the background and the spreadsheet in the background. If time-slices are thirty milliseconds long, for the first thirty milliseconds the CPU gives its undivided attention to the word processor. During the first thirty milliseconds, the word processor and spreadsheet get no CPU time. In the second time-slice, the database gets the CPU's attention. While the current multitasking operating systems provide time-slicing, it is far too coarse to adequately support certain applications. For example, some applications require extremely tight coordination among highly time-critical activities. The proper operation of these applications can be achieved by manipulating the priorities of applications to prevent other activities from being time-starved.
In real-time systems, there is often the requirement for very rapid switching among tasks to ensure that highly sensitive, highly time-critical tasks are executed at just the proper moment. Often such systems need to achieve the effect of multitasking with time slices a fraction of the size of the 20 to 35 millisecond time slices provided by current multitasking micro-processing operating systems. For example, in multimedia applications there typically is a need to precisely synchronize data streams to and from several data channels and schedule input and output events to control and provide superior presentation of sound and motion video. The actual tasks may take only a fraction of a time slice to accomplish and may have to be accomplished more frequently then once every time slice in order to maintain the integrity of the presentation, that is, to ensure that the presentation conveys the impression of smooth and continuous motion.
Other real-time systems frequently contain sets of tasks which require strong coordination at critical, but very finely spaced intervals. The execution timing for one or more tasks can not be predicted exactly, and may be non-deterministic because of a requirement to interact with external agents, such as communication channels, input and output devices or storage devices. In current art systems, separate threads would be established for each of the tasks, but because of the fineness of the time intervals required between coordination events, the time slices provided by the operating system will not permit the coordination required. In these cases, the only alternatives are to increase the priority of the threads involved, with the result that the processing of other threads sharing the processor is effectively blocked, or to program the complex application for a system that does not permit multiprocessing.
Consequently, a technique is needed to provide time slices where multiple subprocesses need to be closely synchronized within time intervals much smaller than the time slice.